package com.foreveross.fetl.application.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.fetl.application.CrawlTaskTemplateApplication;
import com.foreveross.fetl.common.application.BaseApplicationImpl;
import com.foreveross.fetl.core.domain.freight.CrawlTaskTemplateEntity;
@Transactional
@Service("crawlTaskTemplateApplication")
public class CrawlTaskTemplateApplicationImpl extends BaseApplicationImpl implements CrawlTaskTemplateApplication{

	@Override
	public List<CrawlTaskTemplateEntity> findAllByName(String name) {
		CrawlTaskTemplateEntity entity = new CrawlTaskTemplateEntity();
		return entity.getCrawlTaskTemplateList(name);
	}

	@Override
	public List<CrawlTaskTemplateEntity> findAll() {
	/*	List<CrawlTaskTemplateEntity> listEntity = new ArrayList<CrawlTaskTemplateEntity>();
		List<CrawlTaskTemplateVO> listVO = new ArrayList<CrawlTaskTemplateVO>();*/
		CrawlTaskTemplateEntity entity = new CrawlTaskTemplateEntity();
		return (List<CrawlTaskTemplateEntity>) entity.findAll();
	/*	listEntity = (List<CrawlTaskTemplateEntity>) entity.findAll();
		if (null != listEntity && listEntity.size() > 0) {
			for (CrawlTaskTemplateEntity en : listEntity) {
				CrawlTaskTemplateVO vo = new CrawlTaskTemplateVO();
				try {
					BeanUtils.copyProperties(vo, en);
					listVO.add(vo);
				} catch (IllegalAccessException e) {
					e.printStackTrace();
				} catch (InvocationTargetException e) {
					e.printStackTrace();
				}
			}
		}
		return listVO;*/
	}

}
